﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Model;
using DAL;
namespace UI
{
    public partial class index : System.Web.UI.Page
    {
        public List<NewsInfo> newslist = new List<NewsInfo>();
        public List<ProductInfo> productlist = new List<ProductInfo>();
        public List<ImgInfo> imglist = new List<ImgInfo>();
        public List<AdInfo> adlist = new List<AdInfo>();
        public NewsInfo newinfo = new NewsInfo();
        protected void Page_Load(object sender, EventArgs e)
        {
            newslist = NewsDAL.FindTop(20);
            productlist = ProductDAL.FindTop();
            imglist = ImgDAL.FindTop();
            adlist = AdDAL.FindTop(5);
            newinfo = NewsDAL.FindOneById(1);
            this.Page.MetaKeywords = newinfo.img;
            this.Page.MetaDescription = newinfo.context;
        }
    }
}